import utils  from '@utils/index'

export const getProductDetail = function(data) {
    return utils.service({
        url: '/m/product/'+data.id,
        method: 'get'
    });
}

export const addToCart = function(data) {
    return utils.service({
        url: '/m/shoppingcart/add',
        method: 'post',
        data: data
    });
}

export const getCartCount = function() {
    return utils.service({
        url: '/m/shoppingcart/get',
        method: 'get'
    });
}

export const nominateGoods = function(data) {
    return utils.service({
        url: `/m/product/nominate/${data.id}`,
        method: 'get'
    })
}
